package com.xkk.service;

import com.xkk.mapper.EmployeeMapper;
import com.xkk.pojo.Employee;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    private EmployeeService employeeService;

    public void setEmployeeMapper(EmployeeMapper employeeMapper) {
        this.employeeService = employeeService;
    }

    /*展示员工信息*/
    @Override
    public List<Employee> selectAllEmployee() {
        return employeeService.selectAllEmployee();
    }

    //根据id查询员工信息
    @Override
    public Employee selectEmployeeById(int id) {
        return employeeService.selectEmployeeById(id);
    }

    /*增加员工信息*/
    @Override
    public int addEmployee(Employee employee) {
        return employeeService.addEmployee(employee);
    }

    @Override
    public int updateEmployee(Employee employee) {
        return employeeService.updateEmployee(employee);
    }

    @Override
    public int deleteEmployee(int id) {
        return employeeService.deleteEmployee(id);
    }
}
